package com.iworkh.spring.anno.controller;

import com.iworkh.spring.anno.domain.entity.Student;
import com.iworkh.spring.anno.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

/**
 * Student Controller
 *
 * @author: iworkh-沐雨云楼
 * @date: 2019-12-18
 */
@Controller
public class StudentController {

    @Autowired(required = false)
    @Qualifier(value = "studentService")
    private StudentService studentService;

    public void save(Student student){
        System.out.println("StudentController...save");
        studentService.save(student);
    }

    public void delete(String id){
        System.out.println("StudentController...delete");
        studentService.delete(id);
    }

}
